package edu.rpi.cs.android;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.util.Log;

public class Vault extends Activity {

	Accounts acct = new Accounts();

	private static final String TAG = "MyActivity";
	
    
	/** Called when the activity is first created. */
    @Override
    

    
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        String i = "This better work";
        System.out.println("Test acct printlist");
        Log.d(TAG, "test acct printlist - d"+ i);
        Log.v(TAG, "test acct printlist - v" + i);
        
        setContentView(R.layout.main);
        
        final Button welcome_button = (Button)findViewById(R.id.welcome);

        
        welcome_button.setOnClickListener(new View.OnClickListener() {
        	public void onClick(View view) {
   	 
        		if (acct.password())	{
        			Intent i = new Intent(Vault.this, passwordWindow.class);
        			startActivity(i);
        		}	else	{
        			
        			Intent i = new Intent(Vault.this, mainWindow.class);
        			startActivity(i);
        			
        		}
      		}      
        });
    }
}
